package com.example.mydemo.model;

import lombok.Data;

@Data
public class loginVO {
        private boolean success;
        private String message;
//        private String token; // JWT token或其他认证令牌
        private String errorField; // 出错的字段名

        public static loginVO success(String message) {
            loginVO loginVO = new loginVO();
            loginVO.setSuccess(true);
            loginVO.setMessage(message);
//            response.setToken(token);
            return loginVO;
        }

        public static loginVO fail(String message, String errorField) {
            loginVO loginVO = new loginVO();
            loginVO.setSuccess(false);
            loginVO.setMessage(message);
            loginVO.setErrorField(errorField);
            return loginVO;
        }
    }
